import data
import regrese
import matplotlib.pyplot as plt
import numpy as np
import imp


#prekompilovani kodu
imp.reload(regrese)
imp.reload(data)

#=========================GENEROVANI DAT
zadanaTHETA=np.array([1000000,-100000,3])
print("zadane parametry: "+str(zadanaTHETA[:]))
minMax=np.array([[1,1],[1,10],[500,200000]])
pocet=50
[X,y]=data.multiVariable(minMax,50,zadanaTHETA,0)

[theta, E, it, thetaS, XS]=regrese.gradientDescentMultivar(X, y, 1, 0.01)

print("nalezene parametry: "+str(theta[it,:]))
